<%@ page import="kioscodeal.Producto" %>

<div class="form-group fieldcontain ${hasErrors(bean: productoInstance, field: 'codigo', 'error')} required">
	<label for="codigo">
		<g:message code="producto.codigo.label" default="Código" />
		<span class="required-indicator">*</span>
	</label>
	<div class="input-group input-group">
		<span class="input-group-addon"><i class="fa fa-edit"></i></span>
		<g:textField name="codigo" required="" value="${productoInstance?.codigo}" placeholder="Código"/>
	</div>
</div>

<div class="form-group fieldcontain ${hasErrors(bean: productoInstance, field: 'titulo', 'error')} required">
	<label for="titulo">
		<g:message code="producto.titulo.label" default="Título" />
		<span class="required-indicator">*</span>
	</label>
	<div class="input-group input-group">
		<span class="input-group-addon"><i class="fa fa-edit"></i></span>
		<g:textField name="titulo" required="" value="${productoInstance?.titulo}" placeholder="Título"/>
	</div>
</div>

<div class="form-group fieldcontain ${hasErrors(bean: productoInstance, field: 'descripcion', 'error')} required">
	<label for="descripcion">
		<g:message code="producto.descripcion.label" default="Descripción" />
		<span class="required-indicator">*</span>
	</label>
	<div class="input-group input-group">
		<span class="input-group-addon"><i class="fa fa-edit"></i></span>
		<g:textField name="descripcion" maxlength="140" required="" value="${productoInstance?.descripcion}" placeholder="Descripción"/>
	</div>
</div>

<div class="form-group fieldcontain ${hasErrors(bean: productoInstance, field: 'precioUnitario', 'error')} required">
	<label for="precioUnitario">
		<g:message code="producto.precioUnitario.label" default="Precio Unitario" />
		<span class="required-indicator">*</span>
	</label>
	<div class="input-group input-group">
		<span class="input-group-addon">$</span>
		<g:field name="precioUnitario" value="${fieldValue(bean: productoInstance, field: 'precioUnitario')}" required="" placeholder="Precio Unitario"/>
	</div>
</div>

<div class="form-group fieldcontain ${hasErrors(bean: productoInstance, field: 'marca', 'error')} required">
	<label for="marca">
		<g:message code="producto.marca.label" default="Marca" />
		<span class="required-indicator">*</span>
	</label>
	<div class="input-group input-group">
		<span class="input-group-addon"><i class="fa fa-search"></i></span>
		<g:select id="marca" name="marca.id" from="${kioscodeal.Marca.list()}" optionKey="id" optionValue="titulo" required="" value="${productoInstance?.marca?.id}" class="many-to-one form-control" placeholder="Marca"/>
	</div>
</div>

<div class="form-group fieldcontain ${hasErrors(bean: productoInstance, field: 'familia', 'error')} required">
	<label for="familia">
		<g:message code="producto.familia.label" default="Familia" />
		<span class="required-indicator">*</span>
	</label>
	<div class="input-group input-group">
		<span class="input-group-addon"><i class="fa fa-search"></i></span>
		<g:select id="familia" name="familia.id" from="${kioscodeal.Familia.list()}" optionKey="id" optionValue="titulo" required="" value="${productoInstance?.familia?.id}" class="many-to-one form-control" placeholder="Familia"/>
	</div>
</div>

